package com.tentact.servlets;

import com.tentact.service.MeetingService;
import com.tentact.vo.Meeting;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;

@WebServlet(name = "SelectByNameMeetingServlet", value = "/SelectByNameMeetingServlet")
public class SelectByNameMeetingServlet extends HttpServlet {

    MeetingService service = new MeetingService();

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        List<Meeting> meetings = service.SelectByNameMeeting("");
        request.setAttribute("meetings", meetings);
        List<Meeting> meetings1=service.SelelctByNameMeetingSevens("");

        request.setAttribute("meetings1",meetings1);
        request.getRequestDispatcher("notifications.jsp").forward(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request, response);
    }
}
